package com.bsoft.gol.hcs.utils;

/**
 * @Author: lanyu
 * @Description: 关联指标结果性质工具类
 * @Date: create in 2022/7/28 14:57
 */
public class IndexResultUtils {
    private final static String RATION = "定量";
    private final static String NUMBER = "数值";
    private final static String TEXT = "文本";
    private final static String QUALITATIVE = "定性";
    //结果性质类型，1定量，2定性 3 文本
    private final static Byte RATION_TYPE = 1;
    private final static Byte QUALITATIVE_TYPE = 2;
    private final static Byte TEXT_TYPE = 3;

    public static String handleIndexResult(String indexResultName) {
        if (RATION.equals(indexResultName) || NUMBER.equals(indexResultName)) {
            return RATION;
        } else if (TEXT.equals(indexResultName)) {
            return TEXT;
        } else {
            return QUALITATIVE;
        }
    }

    public static Byte getNatureType(String indexResultName) {
        if (RATION.equals(indexResultName) || NUMBER.equals(indexResultName)) {
            return RATION_TYPE;
        } else if (TEXT.equals(indexResultName)) {
            return TEXT_TYPE;
        } else {
            return QUALITATIVE_TYPE;
        }
    }
}
